<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <!-- <p id="name">姓名：</p>
    <p id="age">年龄：</p>
    <p id="gender">性别：</p>
    <p id="married">婚否：</p>
    <p id="house">房子：</p>
    <p id="hobby">爱好：</p> -->
    
    <script>
        document.write("<h1 style='text-align:center'>会员资料</h1>");
        var person = [{
            name:'老六',
            age:21,
            gender:'男',
            marry:false,
            house:null,
            
        }];
        person.forEach((val,index)=>{
            document.write("<p id='name'>姓名："+val.name+"</p><br/>");
            document.write("<p id='age'>年龄："+val.age+"</p><br/>");
            document.write("<p id='gender'>性别："+val.gender+"</p><br/>");
            document.write("<p id='marry'>婚否："+val.marry+"</p><br/>");
            document.write("<p id='house'>有房："+val.house+"</p><br/>");
            document.write("<p id='house'>爱好："+val.hobby+"</p><br/>");
        })

    </script>
</body>
</html>